package nl.haemers.collections.interfaces 
{
	import nl.haemers.collections.interfaces.IQueue;
	import nl.haemers.collections.interfaces.IIterator;
	/**
	 * ...
	 * @author Jonathan Haemers
	 */
	public interface IDeque extends IQueue
	{
		/**
		 * Adds the element at the front of the deque.
		 * @param	e
		 */
		function addFirst(e:Object) : void;
		
		/**
		 * Adds the elemtn at the end of the deque.
		 * @param	e
		 */
		function addLast(e:Object) : void;
		
		/**
		 * Returns an IIterator over the elements in this deque in reverse sequential order.
		 * @return
		 */
		//function descendingIterator() : IIterator;
		
		/**
		 * Returns the first element of the deque.
		 * @return
		 */
		function getFirst() : Object;
		
		/**
		 * Returns the last element of the deque.
		 * @return
		 */
		function getLast() : Object;
		
		/**
		 * Returns an IIterator over the elements in this deque in proper sequence.
		 * @return
		 */
		//override function iterator() : IIterator;
		
		/**
		 * Inserts the specified element at the front of the deque.
		 * @param	e
		 * @return
		 */
		function offerFirst(e:Object) : Boolean;
		
		/**
		 * Insert the specified element at the end of the deque.
		 * @param	e
		 * @return
		 */
		function offerLast(e:Object) : Boolean;
		
		/**
		 * Returns the first element of the deque, or returns null if it's empty.
		 * @return
		 */
		function peekFirst() : Object;
		
		/**
		 * Returns the last element of the deque, or returns null if it's empty.
		 * @return
		 */
		function peekLast() : Object;
		
		/**
		 * Returns and removes the first element of the deque, or returns null if the deque is empty.
		 * @return
		 */
		function pollFirst() : Object;
		
		/**
		 * Returns and removes the last element of the deque, or returns null if the deque is empty.
		 * @return
		 */
		function pollLast() : Object;
		
		/**
		 * Pops an element from the stack.
		 * @return
		 */
		//function pop() : Object;
		
		/**
		 * Pushes an element onto the stack.
		 * @param	e
		 */
		//function push(e:Object) : void;
		
		/**
		 * Removes and returns the first element of the deque.
		 * @return
		 */
		function removeFirst() : Object;
		
		/**
		 * Removes the first occurrence of the specified element from this deque.
		 * @param	e
		 * @return
		 */
		//function removeFirstOccurrence(e:Object) : Boolean;
		
		/**
		 * Removes and returns the last element of the deque.
		 * @return
		 */
		function removeLast() : Object;
		
		/**
		 * Removes the last occurrence of the specified element from this deque.
		 * @param	e
		 * @return
		 */
		//function removeLastOccurrence(e:Object) : Boolean;
	}
	
}